King of Kings 1.99
Copyright (C) 2000 Koundinya Veluri

--------- PACKAGE ---------

KK.exe             - GUI executable
KKE.exe            - Console executable for use as a WinBoard engine
KK.ini             - Configuration file
KK.bk              - Book file containing 11911 positions
24 .bmp files      - Piece pictures for use in the GUI version
Readme.txt         - This file

--------- USAGE ---------

GUI     - run the exe... the GUI is not yet completed so it is not as
          user friendly as that of version 1.0. However, it is more
          stable than that of v.1.0.

Console - run the Winboard Startup Dialog and choose "Play against a
          chess engine or match two engines"
        - enter the exe's full path into:
            - the first box if you wish to play against the engine, or
              if you want the engine to be white in a two-engine matchup
            - the second box if you want the engine to play black in a
              two-engine matchup

See the configuration file for supported commands and their usage.

--------- CREATING BOOKS FOR KING OF KINGS ---------

The book file supplied in the ZIP file was created using the "small.txt"
file found on the Crafty FTP site, ftp://ftp.cis.uab.edu/pub/hyatt/.

Book files are binary files so a book-creating utility is included in
the console version of the program to make books from PGN files.
Actually the code to create books exists in both versions but there is
no interface for doing this yet from the GUI version. Books can be
created from the console version using the makebook command.

Syntax 1 (used for making books from PGN files):
makebook pgn "PGN file" "BK file" <m> <f>

pgn - specifies that the input file is PGN
m   - the maximum number of half-moves (plies) to scan from each game
      in the PGN file (I normally use 60)
f   - the minimum number of times a position or a move at a position
      must be repeated for it to be written to the BK file (I normally
      use 5)

All fields are required. The quotation marks are required.

Example: To make a book from "Games of 2000.pgn", you could type
makebook pgn "Games of 2000.pgn" "kk.bk" 60 5

When making books from PGN files, you will need a lot of free space,
approximately as much as 2.5 times the size of the PGN file. The book
file is usually much smaller than the PGN file.

The book creation process is quite slow from PGN files, and you may
want to try more than one f value to see the difference in size of the
output file. To allow this without having to spend too much time, when
a book is created from a PGN file, a file called "sorted.bin" is also
generated. Creating subsequent books from this BIN file is a much
faster process.

Syntax 2 (used for making books from BIN files):
makebook bin "BIN file" "BK file" <f>

bin - specifies that the input file is BIN
f   - same as above

All fields are required. The quotation marks are required.

Example: To make a book from "sorted.bin", you could type
makebook bin "sorted.bin" "kk.bk" 5

The m value can be set only by creating a book from a PGN file. All
books created from "sorted.bin" will use the same m value that was
used to create the "sorted.bin" file.

When parsing the PGN file, the utility will ignore anything it doesn't
understand. NAGs are ignored. Anything enclosed in (), [], or {} are
skipped; it will even handle nested comments, under one condition. Each
opening bracket ('(', '[', or '{') must have a space before it, and
each closing bracket (')', ']', or '}') must have a space after it. If
this condition is not satisfied, the program will probably skip the
rest of the PGN file thinking that it is all a comment. But this only
happens with nested comments. If you notice any more problems, please
notify me so I can fix them!

--------- ABOUT THE PROGRAM ---------

King of Kings was programmed in C++. The GUI version uses MFC and
therefore compiles only under Visual C++. The executables in this
package were compiled with Visual C++ 6.0. They are both 32-bit, and
will run only on a Windows operating system.

Web site: http://www.ecf.utoronto.ca/~veluri/chess/

--------- DISTRIBUTION/COPYRIGHT ---------

Everything in the package (including the bitmaps) is copyright (C)
Koundinya Veluri. Code used to link King of Kings with Nalimov endgame
tablebases is copyright (C) Eugene Nalimov. Some code used to decompress
these tables is copyright (C) Andrew Kadatch. You may distribute an
unmodified copy of the original package freely without charge. According
to copyright law, modification of any components of this package without
my written authorization, is prohibited. Any commercial use of this
program is prohibited.

--------- REFERENCES/LINKS ---------

-   Tom Kerrigan's Simple Chess Program (TSCP)
    http://ucsu.colorado.edu/~kerrigat/
-   Robert Hyatt's Crafty
    ftp://ftp.cis.uab.edu/pub/hyatt/
-   Eugene Nalimov (endgame tablebases)
    mailto:eugenen@microsoft.com
-   Paul Verhelst's Computer Chess Programming web site
    http://www.xs4all.nl/~verhelst/chess/programming.html
-   Strategy and board game programming (lecture notes by David Eppstein)
    http://www.ics.uci.edu/~eppstein/180a/w99.html
-   Tim Mann's Chess Pages (home of WinBoard and XBoard)
    http://www.tim-mann.org/chess.html

--------- THANKS ---------

-   to Tom Kerrigan for the surprisingly simple yet fast and strong TSCP.
-   to Tim Mann [do I have to explain? ok...] for making WinBoard.
    Without it, I don't know where I would be today :)
-   to Eugene Nalimov for making the tablebases.
-   to Andrew Kadatch for permission to use his TB decompression code.
-   to all regulars on the WinBoard & CCC Forums for answering my
    questions and running the tournaments.
-   to Gnther Simon for pointing out a problem when using 6-piece TB's.

--------- VERSION HISTORY ---------

1.99

-   Fixed a bug that allowed it to crash on a draw by repetition.
-   Tuned some evaluation parameters. Added a little more king safety
    knowledge, although king safety is still very inaccurate. Completely
    rewrote weak pawn evaluation for more precice play.
-   Cleaned up a lot of code and refined search routines.
-   Better move ordering for all levels of the tree.
-   Improved time management. Sometimes in 1.98, it makes one or two
    very quick moves and finds itself losing afterwards. Hopefully this
    won't happen in 1.99, except for legitimate cases.
-   It now uses aspiration search at the root of the tree.
-   Fixed some problems with scanning PGN files when creating books.

1.98

-   Fixed synchronization and en passant square bugs that could allow
    the engine to, but rarely, make an illegal and/or absurd move.
-   Due to the en passant square hashing bug mentioned above, I had to
    modify the hashing algorithm. This means that old opening books
    won't work with 1.98. Either replace your opening book with the one
    in the ZIP file, or create a book from a PGN file.
-   Completely rewrote the updates system to allow much faster response
    from the program. In the previous system, the program would only
    respond in intervals of 100 ms, but in lightning games this was
    too long for a reply move and it would often lose on time. This
    should never happen again.
-   Introduced fractional depth increments and completely rewrote and
    retuned all search extensions. Due to this, 1.98 performs
    significantly better than 1.97 on most tactics.
-   Implemented the trick to try the move from the transposition table
    before generating moves --> small speed improvement.
-   Better time management with pondering. Pondering now checks the
    transposition table to get an expected move.

1.97

-   Tuned many evaluation parameters involving kings and minor pieces.
-   Added knowledge of passed pawns and the pressure they exert.
-   Slightly better time management; uses more time at the beginning
    of the game and very little when it's about to lose on time.
-   Slightly faster at tactics in most of the positions I tested.

1.96

-   King of Kings now also plays on the Internet Chess Club (ICC) under
    the login KingKings.
-   Has an opening book and comes with a book-creating utility.
-   Supports Nalimov endgame tablebases, created by Eugene Nalimov.
-   Better time usage with pondering.
-   Better knowledge of king safety.
-   Fixed bugs in detection of draws by insufficient material.
-   Improved pruning for slightly faster detection of tactics.
-   Slightly stronger than 1.95.

1.95

-   King of Kings now plays on the Free Internet Chess Server (FICS)
    under the login KingKings (my login is kount). King of Kings only
    recently joined FICS but at the time of this writing, its ratings
    are: lightning (2274), blitz (2169), standard (2096).
-   Many bugs fixed (evaluation, GUI stalling, console output, etc.).
-   Added a LOT more knowledge (king safety, minor piece mobility,
    space control, etc.).
-   Added razoring and forward pruning. This and the evaluation put
    together tremendously slowed down the search but I think it's
    worth it; it's reaching greater depths than before.
-   King of Kings can now ponder on its opponent's time. This greatly
    helped on FICS.
-   It now recognizes draws by insufficient material. This greatly
    improved its endgame play.
-   Defeats version 1.93 or 1.94 most of the time. Occasionally defeats
    and often draws against Arasan (which was the second chess program
    I had ever seen and I was fascinated by its strength) in blitz
    matches, although Arasan is still much stronger than King of Kings
    (big difference when it comes to test positions).

1.94

-   Some evaluation bugs fixed
-   Some speed improvements
-   A little more knowledge, mostly on pawn structure and king safety
-   Several changes in the search including a faster quiescence search
    and selective extensions
-   Introduced a configuration file from which settings are loaded by
    both the GUI and console version of the program

1.93

-   Evaluation redesigned
-   Much more knowledge (especially about pawn structure and king safety)

1.92

-   All known bugs fixed
-   Supports the WinBoard "setboard" command

1.91

-   There are many known bugs
-   Uses WinBoard protocol version 2

--------- ABOUT THE AUTHOR ---------

My name is Koundinya Veluri, but most people call me Kount for short.
Actually some people don't even know my real name! I am a 2nd year
computer engineering student at the University of Toronto. I am 19 years
old. I've been working on chess programming since the summer of 1999.
I love playing chess too, but my largest problem is patience. I just
can't play at tournaments, although I'm not that good anyway. I used to
play a lot of badminton in high school (I wouldn't miss a tournament) but
 to tell you the truth, university badminton is just not as fun as high
school badminton. It's more about competition here than having fun (yes
these guys at the badminton club are too good). I also love playing the
piano.

My e-mail is kountv@hotmail.com if you have any comments, suggestions,
bugs (please report any bugs you find to me!!! it would be a great help!).
My web site is http://www.ecf.utoronto.ca/~veluri/
